import request from "@/utils/request";
import { getParamsSuffix } from "@/utils/paramsUtils";


/**
 * 分页
 * @param params
 * @returns {Promise<any>}
 */
export async function selList(params) {
    return request('/api/cdcerservice/v1/followup/selList', {
        method: 'POST',
        requestType: 'form',
        data: { ...params },
    });
}

/**
 * 删除
 * @param query
 * @returns {Promise<any>}
 */
export async function del(query) {
    const params = getParamsSuffix(query);
    return request(`/api/cdcerservice/v1/followup/del?${params}`);
}

/**
* 详情
* @param query
* @returns {Promise<any>}
*/
export async function selById(query) {
    const params = getParamsSuffix(query);
    return request(`/api/cdcerservice/v1/followup/selById?${params}`);
}


/**
 * 添加保存
 * @param params
 * @returns {Promise<any>}
 */
export async function add(params) {
    return request('/api/cdcerservice/v1/followup/add', {
        method: 'POST',
        requestType: 'form',
        data: { ...params },
    });
}

/**
 * 获取姓名id
 * @param params
 * @returns {Promise<any>}
 */
export async function listAllTableData(params) {
    return request('/api/cdcerservice/v1/cerSysteminitImportInfo/waitingFollowUpPersonnel', {
        method: 'POST',
        requestType: 'form',
        data: { ...params },
    });
}

/**
 * 编辑
 * @param params
 * @returns {Promise<any>}
 */
export async function edit(params) {
    return request('/api/cdcerservice/v1/followup/edit', {
        method: 'POST',
        requestType: 'form',
        data: { ...params },
    });
}


/**
* 省市区镇乡
* @param query
* @returns {Promise<any>}
*/
export async function getCity(query) {
    const params = getParamsSuffix(query);
    return request(`/api/cdcerserver/v1/cerpersoninfo/getCity?${params}`);
}



